package com.boardgame.gwt.data.tile.hazard;

import com.boardgame.gwt.data.GwtGameBoard;
import com.boardgame.gwt.data.space.GwtSpace;

/**
 * 岩石
 */
public class GwtSpaceTileHazardRockfall extends GwtSpaceTileHazard {
    public GwtSpaceTileHazardRockfall(){
        this.setInfo("rockfall");
        this.setVpoints(3);
    }

    @Override
    public void addTileToMapSpace(GwtGameBoard gwtGameBoard) {
        for (int i=0;i<4;i++){
            //是否为空
            GwtSpace gwtSpace = gwtGameBoard.getGwtSplace(11,i);
            if (gwtSpace.getGwtSpaceTile()==null){
                gwtSpace.setGwtSpaceTile(this);
                return;
            }
        }
    }
}
